/*
 * CAnthill.h
 *
 *  Created on: 14 Oct 2012
 *      Author: Mario Kleinsasser
 *		Time:	17:19:53
 */

#ifndef CANTHILL_H_
#define CANTHILL_H_

#include "CItem.h"
#include <list>

using namespace std;

class CAnthill: public CItem {

private:
	int antcount;

	/*
	 *  List of ants that are in the anthill
	 *  at the beginning, the list is empty and is only filled up
	 *  if an ant returns
	 *
	 */
	list<CItem *>antList;

	/*
	 * The food counter. The consturctor will construct the anthill with a value of 200 food
	 * This is enough to build up 20 ants a 20 food
	 */
	int food;

	/* Dummy private method to print the anthill */
	void print();

	/* M N position */
	int M, N;



public:
	/*
	 * Default constructor with default argument to initialize the anthill with 100 food.
	 * This implementation makes it possible to create different anthills with the factory
	 */
	CAnthill(int defFood = 200);

	virtual ~CAnthill();

	/* Public interface to call the act method on anthill*/
	int act();

	/*
	 * Public interface to bring back the ants into the anthill
	 */
	void addAntToAnthill(CItem *ant);


};


#endif /* CANTHILL_H_ */
